package com.zyzd.general.entity.local;

import android.support.v4.app.Fragment;
import android.text.TextUtils;

import com.zyzd.general.R;

import java.io.Serializable;

/**
 * Created by lzy on 2018/5/15 0015.
 * description ${管理列表 Entity}
 */
public class ManagerListEntity implements Serializable{
    private int containerViewId = R.id.fl_container;
    private String text;
    private Fragment fragment;
    private String tag;

    public ManagerListEntity(String text, Fragment fragment) {
        this.text = text;
        this.fragment = fragment;
    }

    public ManagerListEntity(int containerViewId, String text, Fragment fragment) {
        this.containerViewId = containerViewId;
        this.text = text;
        this.fragment = fragment;
    }

    public ManagerListEntity(int containerViewId, String text, Fragment fragment, String tag) {
        this.containerViewId = containerViewId;
        this.text = text;
        this.fragment = fragment;
        this.tag = tag;
    }

    public int getContainerViewId() {
        return containerViewId;
    }

    public void setContainerViewId(int containerViewId) {
        this.containerViewId = containerViewId;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public Fragment getFragment() {
        return fragment;
    }

    public void setFragment(Fragment fragment) {
        this.fragment = fragment;
    }

    public String getTag() {
        return TextUtils.isEmpty(tag) ? text : tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    @Override
    public String toString() {
        return "ManagerListEntity{" +
                "containerViewId=" + containerViewId +
                ", text='" + text + '\'' +
                ", fragment=" + fragment +
                ", tag='" + tag + '\'' +
                '}';
    }
}
